package com.chen.demo.simple.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;

import java.util.Optional;

@Configuration
public class JpaAuditorConfig implements AuditorAware<String> {
    /**
     * 这里为测试数据，请根据真实业务来
     *
     * @return {@link Optional}<{@link String}>
     */
    @Override
    public Optional<String> getCurrentAuditor() {
        return Optional.of("张三");
    }
}
